import Requester from './request.js'
import { bptDomain } from './../utils/index'

class Api {
  //获取自己的完整用户信息
  static getUserInfor(data = {}) {
    return Requester.get(`/doctor-cheese/user/v1/info/complete`, data)
  }
  //发送用户登录/注册短信验证码
  // static getUserInfor(data = {}) {
  //   return Requester.get(`/doctor-cheese/auth/v1/sms/vc`, data)
  // }
  //用户注册/登录(手机&code)
  // static getUserInfor(data = {}) {
  //   return Requester.post(`/doctor-cheese/auth/v1/login/pn`, data)
  // }
  //查询指定课程的详情信息
  static getCourseChapterList(courseId, data = {}) {
    return Requester.get(`/doctor-cheese/course/v1/chapter/list/${courseId}`, data)
  }
  // 查询指定章节的课件列表
  static getCoursewareChapterList(data = {}) {
    return Requester.get(`/doctor-cheese/courseware/v1/chapter/list`, data)
  }
  // 查询指定课程的详情信息
  static getCourseDetail(id, data = {}) {
    return Requester.get(`/doctor-cheese/course/v1/detail/${id}`, data)
  }
  // 查询指定课程的详情信息v2
  static getCourseV2Detail(id, data = {}) {
    return Requester.get(`/doctor-cheese/course/v2/detail/${id}`, data)
  }
  // 发送用户登录/注册短信验证码
  static getSmsVc(data = {}) {
    return Requester.get(`/doctor-cheese/auth/v1/sms/vc`, data)
  }
  // 用户注册/登录(手机&code)
  static loginPn(data = {}) {
    return Requester.post(`/doctor-cheese/auth/v1/login/pn`, data)
  }
  // 邀请新用户成为下级代理
  static personageInvite(data = {}) {
    return Requester.post(`/doctor-cheese/agent/v1/personage/invite`, data)
  }
  // 手机号，密码登录
  static loginPp(data = {}) {
    return Requester.post(`/doctor-cheese/auth/v1/login/pp`, data)
  }
  // 通过手机验证码修改密码
  static putMyPassword(data = {}) {
    return Requester.put(`/doctor-cheese/user/v1/my/password`, data)
  }
  // 修改自己的基础信息
  static putMyInformation(data = {}) {
    return Requester.put(`/doctor-cheese/user/v1/my/info`, data)
  }
  // 获取用户身份列表
  static getUserHalo(data = {}) {
    return Requester.get(`/doctor-cheese/user/halo/v1/my`, data)
  }
  //获取自己的用户信息
  static getUserInfor(data = {}) {
    return Requester.get(`/doctor-cheese/user/v1/info/extend`, data)
  }
  // 查询会员权益列表
  static getEquityList(data = {}) {
    return Requester.get(`/doctor-cheese/user/halo/v1/base-member/equity/list`, data)
  }
  // 查询会员卡类型列表
  static getMemberCardList(data = {}) {
    return Requester.get(`/doctor-cheese/user/halo/v1/base-member/card/list`, data)
  }
  // 开通会员创建订单
  static vipPlaceOrder(data = {}) {
    return Requester.post(`/doctor-cheese/order/user/halo/v1/place-order`, data)
  }
  //开通会员确认支付
  static payVipOrder(data = {}) {
    return Requester.post(`/doctor-cheese/order/user/halo/v1/pay-order`, data)
  }
  //查询开通会员订单状态
  static getVipStatus(orderId, data = {}) {
    return Requester.get(`/doctor-cheese/order/user/halo/v1/status/${orderId}`, data)
  }
  // 生成订单
  static placeOrder(data = {}) {
    return Requester.post(`/doctor-cheese/order/commodity/v1/place-order`, data)
  }
  //查询商品订单状态
  static getCommodityState(orderId, data = {}) {
    return Requester.get(`/doctor-cheese/order/commodity/v1/status/${orderId}`, data)
  }
  //确认支付商品订单
  static getCommodity(data = {}) {
    return Requester.post(`/doctor-cheese/order/commodity/v1/pay-order`, data)
  }
  // 查询章节列表
  static getQuestionChapterList(libraryId, data = {}) {
    return Requester.get(`/doctor-cheese/question/v1/library/catalog/${libraryId}`, data)
  }
  // 查询单个题库详情
  static getQuestionBankSingleDetail(libraryId, data = {}) {
    return Requester.get(`/doctor-cheese/question/v1/library/detail/${libraryId}`, data)
  }
  // 查询单个题库详情
  static getQuestionBankSingleDetailV2(libraryId, data = {}) {
    return Requester.get(`/doctor-cheese/question/v2/library/detail/${libraryId}`, data)
  }
  //标本库详情页
  static getLibraryDetail(slideLibraryId, data = {}) {
    return Requester.get(`/doctor-cheese/slide/v1/library/detail/${slideLibraryId}`, data)
  }
  //标本库详情页
  static getLibraryDetailV2(slideLibraryId, data = {}) {
    return Requester.get(`/doctor-cheese/slide/v2/library/detail/${slideLibraryId}`, data)
  }
  // 解剖产品详情
  static getAnatomyMgCommodityDetailId(productId, data = {}) {
    return Requester.get(`/doctor-cheese-anatomy/anatomy/mg/v1/commodity/detail/${productId}`, data)
  }

  //查询用户是否完善过信息
  static getUserCompleteInfo(data = {}) {
    return Requester.get(`/doctor-cheese/user/v1/my/info/complete`, data)
  }
  //查询标签组信息
  static getUserGroup(data = {}) {
    return Requester.get(`/doctor-cheese/data-tag/v1/group/list`, data)
  }
  // 查询指定的佣金系数比例数据
  static getRatioData(data = {}) {
    return Requester.get(`/doctor-cheese/commission/config/v1/ratio/data`, data)
  }

  //查询标本详情
  static getSpecimen(id, data = {}) {
    return Requester.get(`/doctor-cheese/slide/v1/${id}`, data)
  }

  /**
   * 查询预设标注列表
   * @param {AnnotationListQuery} data 
   * @returns 
   */
  static getPresetAnnotationList(params = {}) {
    return Requester.get(`/doctor-cheese/slide/v1/annotation/preset/list`, params)
  }
  /**
   * 
   * @param {AnnotationListQuery} data 
   * @returns 
   */
  static getMyAnnotationList(params = {}) {
    return Requester.get(`/doctor-cheese/slide/v1/annotation/my/list`, params)
  }
  // 查询用户身份
  static getUserRoleTag(params = {}) {
    return Requester.get(`/doctor-cheese/data-tag/v1/list`, params)
  }
  // 查询oss上传参数
  static ossUploadParameter(data = {}) {
    return Requester.get(`/doctor-cheese/open/v1/oss`, data)
  }
  // 完善信息
  static userAuthInfo(data = {}) {
    return Requester.put(`/doctor-cheese/user/v2/my/auth`, data)
  }
  // (软件模块)展示后台设置已上线的软件
  static getSimulatioInfo(data = {}) {
    return Requester.get(`/doctor-cheese-anatomy/simulation/v1/info`, data);
  }
  // 项目详情
  static getSimulationItemSoftProjectId(softProjectId, data = {}) {
    return Requester.get(`/doctor-cheese-anatomy/simulation/v1/item/${softProjectId}`, data);
  }
  // (项目展示模块)展示后台设置已上线的软件的项目列表
  static getSimulationItemList(data = {}) {
    return Requester.get(`/doctor-cheese-anatomy/simulation/v1/item/list`, data);
  }
  // (项目展示模块)软件详情
  static getSimulationDetail(softId, data = {}) {
    return Requester.get(`/doctor-cheese-anatomy/simulation/v1/${softId}`, data);
  }
  //医学资讯详情
  static getNewsDetail(id, data = {}) {

    return Requester.get(`/doctor-cheese/news/v3/${id}`, data);
  }
  //查看文件路径
  static getOperateCheck(data = {}) {
    return Requester.get(`/doctor-cheese/operate/v1/check`, data);
  }
  //查询赛事
  static getInfoMs(id, data = {}) {
    return Requester.get(`/megagame-platform/info/v1/ms/${id}`, data)
  }
}

export default Api
